import * as React from "react";
const { useState, useCallback } = React;

const App = () => {
  const [count, setCount] = useState(0);
  const add = useCallback(() => {
    setCount(count => count + 1);
  }, []);
  return (
    <div>
      <h1>{count}</h1>
      {count % 2 === 0 && <p>11</p>}
      <button onClick={add}>+1</button>
    </div>
  );
};

export default App;
